﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.FinanceModule.Models.DataMaintains.CreateOrEditBillAccountModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Pages_FinanceModule_DataMaintains_EditAccount") + ": " + Model.BillAccount.AccountName) : L("Pages_FinanceModule_DataMaintains_CreateAccount")))
<div class="modal-body">

    <form name="ObjectForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="SchoolName" id="SchoolName" />
        <input type="hidden" name="AccountType" id="AccountType" />
     
        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.BillAccount.Id" />
        }
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <select class="form-control edited" id="AccountTypeId" name="AccountTypeId">
               
                <option value="1">现金</option>
                <option value="2">银行存款</option>
                <option value="3">虚拟货币</option>
                <option value="4">应收款(债权)</option>
                <option value="5">应收款(债务)</option>
            </select>
            <label>@L("Pages_FinanceModule_BillAccounts_GridColumn_AccountType")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="AccountName" value="@Model.BillAccount.AccountName" class="form-control edited" required maxlength="@BillAccount.MaxNameLength" />
            <label>@L("Pages_FinanceModule_BillAccounts_GridColumn_AccountName")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            @Html.DropDownList("SchoolId", Model.GetSchoolList.Select(a => a.ToSelectListItem()), new { @class = "form-control edited" })
            <label>@L("Pages_FinanceModule_BillAccounts_GridColumn_SchoolName")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
           
            <div class="md-checkbox">
                <input id="IsTollAccount" class="md-check" type="checkbox" name="IsTollAccount" value="true" @Html.Raw(Model.BillAccount.IsTollAccount? "checked=\"checked\"" : "") />
                <label for="IsTollAccount">
                    <span class="inc"></span>
                    <span class="check"></span>
                    <span class="box"></span>
                   @L("Pages_FinanceModule_BillAccounts_GridColumn_IsTollAccount")
                </label>
            </div>
           
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Balance" value="@Model.BillAccount.Balance" class="form-control edited" />
            <label>@L("Pages_FinanceModule_BillAccounts_GridColumn_Balance")</label>
        </div>

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="Remark" value="@Model.BillAccount.Remark" class="form-control edited" maxlength="@BillAccount.MaxRemarkLength" />
            <label>@L("Pages_FinanceModule_BillAccounts_GridColumn_Remark")</label>
        </div>


    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")


